<?php
//
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');

require_once "../init.php";
require_once (ROOTPATH . "/dt-database/db_conn.php");
require_once (B_MOD . "/post.php");


$post = new Post($db);
$salt = "TrashinkDreamTree";
function deal_input($data) {
    #这是一个过滤函数
    #  "\0" - NULL,"\t" - 制表符,"\n" - 换行,"\x0B" - 垂直制表符,"\r" - 回车," " - 空格
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    return $data;
}
function fliter($data){
    #过滤 ？ 字符之间的空格
    #$data = str_replace('addslashes("\")',"",$data);
    $arr=array("/", "?", " ","?","？","、","`","()");
    $rep = array("","",  "", "", "",  "",  "","");
    $data=str_replace($arr,$rep,$data);
    return $data;
}









